<template>
	<view style="padding: 30rpx;">
		<!-- 按钮，打印日志 -->
		<button @click="onLog()">Console.log</button>
		<button @click="onDebug()">Console.debug</button>
		<button @click="onInfo()">Console.info</button>
		<button @click="onWarn()">Console.warn</button>
		<button @click="onError()">Console.error</button>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				myname:"lwt",
				title:"APIs"
			}
		},
		onLoad(){
			console.log("onLoad");
			
		},
		methods: {
			onLog(){
				//打印一个日志
				console.log("onLog()-->myname: " +this.myname);
				console.log("clog+enter");
				
				console.log("onLog()",this.myname,this.title);
				
			
			},
			onDebug(){
				console.debug("onDebug")
			},
			onInfo(){
				console.info("onInfo")
			},
			onWarn(){
				console.warn("onWarn")
				if(true){
					console.log("true");
				}else{
					console.warn("快出错了...")
				}
			},
			onError(){
				console.error("onError")
				try{
					
				}catch(e){
					console.error(e)
				}
			}
			
		}
	}
</script>

<style>
button{
	margin:20rpx;
}
</style>
